<?php

namespace App\Http\Controllers\Home;

use App\Http\Controllers\Controller;
use App\Model\BannerModel;
use App\Model\ConfigModel;
use Illuminate\Http\Request;

class HomeController extends Controller
{
    public function index()
    {
        $data['banner'] = BannerModel::get();
        $data['services'] = [
            'SZL Series Evaporative Condenser','NZL Series Evaporative Condenser','Anti-fog Closed Tower','Closed Cooling Tower ',
            'SLT Series Evaporative Cooler','NBT Series Evaporative Cooler','Compound Cooling Tower','Air cooled heat exchanger'
        ];
        $data['advantages'] = [
            ['Quality Control','4.jpg'],
            ['Material Selection','4.jpg'],
            ['Certificates','4.jpg'],
            ['Packing & Transportation','4.jpg']
        ];

        $data['product'] = [
          1,2,3,4,5,6,7,8
        ];

        return view('front.index')->with('data',$data);
    }

    /**
     * 关于我们
     *
     * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
     */
    public function about()
    {
        $data['seo'] = ConfigModel::where('config_type','about')
            ->first();
        $data['tech_center'] = \DB::table('tech_center')
            ->select(['id','img','title'])
            ->get();
        return view('front.about')->with('data',$data);
    }

}
